Skip to content

Add wrangler.jsonc for docs.teemops.com Workers deploy - #114

Merged
kiwifellows merged 1 commit into
developfrom
docs/cloudflare-workers-deploy
Aug 5, 2026
Merged

Add wrangler.jsonc for docs.teemops.com Workers deploy#114
kiwifellows merged 1 commit into
developfrom
docs/cloudflare-workers-deploy

Conversation

@kiwifellows

Copy link
Copy Markdown
Contributor

What and why

Cloudflare's dashboard build for docs.teemops.com is configured on the unified Workers Builds system (wrangler deploy / wrangler versions upload), not classic Pages, and that system reads its static-assets output directory from a wrangler config in the repo rather than a dashboard "build output directory" field. Deploys were failing with "Could not detect a directory containing static files" because no such config existed — nothing told Wrangler that mkdocs build's output lives in site/.

User story

Infrastructure change — no user story.

How it was tested

  • mkdocs build locally, confirmed site/ contains the expected static HTML (including 404.html).
  • npx wrangler deploy --dry-run against the built site: read 85 files from site/, no bindings needed, no errors.
  • Confirmed .gitignore already excludes /site/ as a build artifact — only the config is committed.

Quality gate

  • Acceptance criteria are met — deploy no longer errors on missing static files, verified with a dry run
  • Solves the user problem simply — one small config file, no Worker script, no new dependency
  • Follows the practices in docs/practices/ — no secrets, no speculative config beyond what's needed to deploy
  • Tests written and passing — no automated test for a deploy config; existing docs CI job already builds site/ on every push, which is the closest available check
  • Documentation updated — n/a, this is deploy plumbing, not a doc page
  • No obvious performance issues
  • Ready for production

Practices check

  • Simplicity — pure static-assets deploy, no Worker script, no speculative options beyond not_found_handling
  • Security — no secrets in the file; Cloudflare API token/account stay in the dashboard's own connection

Out of scope

Renaming the Cloudflare project if tops-docs ever needs to change — confirmed correct for now.

Made with Cursor

Cloudflare's dashboard build for docs.teemops.com now uses the unified
Workers Builds system (`wrangler deploy` / `wrangler versions upload`),
which reads its output directory from a wrangler config in the repo rather
than a dashboard field. Without one, deploys failed with "Could not detect
a directory containing static files" because there was nothing telling
Wrangler that `mkdocs build`'s output lives in `site/`.

Points assets.directory at `./site` and sets not_found_handling to
"404-page" so mkdocs' generated 404.html is served instead of Cloudflare's
blank default. No Worker script needed — this is a pure static-assets
deploy, verified locally with `mkdocs build` + `wrangler deploy --dry-run`.

Co-authored-by: Cursor <cursoragent@cursor.com>
@kiwifellows
kiwifellows merged commit d967e54 into develop Aug 5, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant